Repository navigation
feat: reproducibility tests — Phase 2 benchmark honesty - #9
Closed
cschanhniem wants to merge 1 commit into
Closed
cschanhniem wants to merge 1 commit into
cschanhniem wants to merge 1 commit into
Conversation
Phase 2: Reproducibility — rankings from same inputs must be reproducible.
- Update schemas/run_manifest.schema.json: add generated_at and input_hashes
as required fields (previously absent from schema but present in output)
- Add test_reproducibility.py: 18 tests verifying:
- Two independent runs produce identical JSONL ranking order
- Two runs produce identical scores for every candidate
- Two runs produce identical selected candidate set
- run_manifest.json is generated alongside ranked.jsonl
- Explicit manifest_path argument is respected
- Manifest validates against updated JSON Schema
- All required fields present (run_id, pipeline_version, config_hash,
generated_at, inputs, input_hashes, outputs)
- pipeline_version in manifest matches installed package __version__
- run_id is valid UUID format
- Two runs produce different run_ids (unique per run)
- SHA-256 hashes in manifest match actual files
- Candidate and reference paths recorded in manifest
- stable_json_hash() is deterministic for same config
- stable_json_hash() changes when config changes
- build_run_manifest() produces correct structure
- SHA-256 output is 64-char lowercase hex
- Different file content → different SHA-256
- file_sha256() matches stdlib hashlib computation
- Add recall_at_k, enrichment_factor, benchmark_summary to evaluate.py
- Fix ruff F401/E741 issues across pipeline.py, test_cli.py, test_pipeline_filters.py
- 55 tests passing, ruff clean
Collaborator
Author
|
Superseded by PR #11 (feat/integrate-all-phases), which merges all Phase 2 + Phase 3 work into a single consolidation PR with 251 tests passing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements Phase 2: Reproducibility from AGENTS.md:
This PR verifies that the pipeline produces identical results across independent runs and that every run generates a cryptographically traceable manifest.
Changes
schemas/run_manifest.schema.jsonAdded
generated_atandinput_hashesas required fields (they were being generated but not schema-validated).tests/test_reproducibility.py(18 tests)What the tests prove
Test plan
make test— 55 tests passruff check src tests— clean